package ist.utl.pt.smartfleet.stationterminal.station;

import ist.utl.pt.smartfleet.stationterminal.location.Location;
import ist.utl.pt.smartfleet.stationterminal.traveller.Traveller;

import java.io.Serializable;
import java.util.Collection;

public class Station implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1331762973991290790L;

	private int idStation;
	private Location location;
	private String state;
	private Collection<Traveller> travellers;

	
	public Station(){
	}
	
	public Station(String id,String state){
		this.idStation = Integer.parseInt(id);
		this.state = state;
	}
	
	/**
	 * @return the idStation
	 */
	public int getIdStation() {
		return idStation;
	}

	/**
	 * @param idStation
	 *            the idStation to set
	 */
	public void setIdStation(int idStation) {
		this.idStation = idStation;
	}

	/**
	 * @return the location
	 */
	public Location getLocation() {
		return location;
	}

	/**
	 * @param location
	 *            the location to set
	 */
	public void setLocation(Location location) {
		this.location = location;
	}

	/**
	 * @return the travellers
	 */
	public Collection<Traveller> getTravellers() {
		return travellers;
	}

	/**
	 * @param travellers
	 *            the travellers to set
	 */
	public void setTravellers(Collection<Traveller> travellers) {
		this.travellers = travellers;
	}

	/**
	 * @return the state
	 */
	public String getState() {
		return state;
	}

	/**
	 * @param state the state to set
	 */
	public void setState(String state) {
		this.state = state;
	}
	
	public String toString(){
	
	  return this.idStation+","+this.state+","+this.location.toString();
	  
	}

}
